﻿<!DOCTYPE html>
<html>
<!-- hse行动计划跟进表 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    <div id="app" class="popupW100" v-cloak>
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px"
                 size="mini">
            <el-row>
                <el-row>
                    <el-col :span="11">
                        <p class="main-label">{{HSEActionPlanFollowupTable.Sourcesofactionplans+mark.m}}</p>
                        <p class="lh35">{{Form.sourcesofactionplans}}</p>
                    </el-col>
                    <el-col :span="11" :offset="2">
                        <p class="main-label">{{"编号"+mark.m}}</p>
                        <p class="lh35">{{Form.serialnumber}}</p>

                    </el-col>

                </el-row>
                <el-row>
                    <el-col :span="24">
                        <p class="main-label">{{HSEActionPlanFollowupTable.Specificcontentofactionplan+mark.m}}</p>
                        <p class="lh35">{{Form.specificcontentofactionplan}}</p>
                    </el-col>

                </el-row>
                <el-row>
                    <el-col :span="11">
                        <p class="main-label">{{HSEActionPlanFollowupTable.Plannedcompletiondate+mark.m}}</p>
                        <p class="lh35">{{Form.plannedcompletiondate.substring(0,10)}}</p>
                    </el-col>
                    <el-col :span="11" :offset="2">
                        <p class="main-label">{{HSEActionPlanFollowupTable.Personliable+mark.m}}</p>
                        <p class="lh35">{{Form.sysUser.name}}</p>

                    </el-col>
                    <!--<el-col :span="11">
                <div class="elst-select-mini">
                    <el-form-item prop="sourcesofactionplans">
                        <el-input type="text" v-model="Form.sourcesofactionplans" autocomplete="off"
                                  size="mini">
                            <template slot="prepend">
                                {{HSEActionPlanFollowupTable.Sourcesofactionplans+mark.m}}
                            </template>
                        </el-input>
                    </el-form-item>
                </div>
            </el-col>
            <el-col :span="11" :offset="2">
                <div class="elst-select-mini">
                    <el-form-item prop="serialnumber">
                        <el-input type="text" v-model="Form.serialnumber" autocomplete="off" size="mini">
                            <template slot="prepend">
                                {{"编号"+mark.m}}
                            </template>
                        </el-input>
                    </el-form-item>
                </div>
            </el-col>
            <el-col :span="24">
                <div class="elst-select-mini">
                    <el-form-item>
                        <div class="el-input--mini el-input-group">
                            <div class="el-input-group__prepend">
                                {{HSEActionPlanFollowupTable.Specificcontentofactionplan+mark.m}}
                            </div>
                            <el-input class="el-textarea__inner" type="textarea"
                                      v-model="Form.specificcontentofactionplan" autocomplete="off"></el-input>
                            <span class="iputLineMust" v-if="Form.specificcontentofactionplan.length<=0">

                                <img src="/static/images/exclamation.png" alt="">
                            </span>
                        </div>
                    </el-form-item>
                </div>
            </el-col>-->
                    <!--<el-col :span="11">
                <el-form-item>
                    <div class="elst-select-mini">
                        <el-input size="mini">
                            <template slot="prepend">
                                {{HSEActionPlanFollowupTable.Plannedcompletiondate+mark.m}}
                            </template>
                            <el-date-picker slot="suffix" v-model="Form.plannedcompletiondate" type="date" readonly
                                            size="mini" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择时间">
                            </el-date-picker>
                        </el-input>
                    </div>
                </el-form-item>
            </el-col>
            <el-col :span="11" :offset="2">
                <div class="elst-select-mini">
                    <el-form-item prop="personliable">

                        <el-input size="mini">
                            <template slot="prepend">
                                {{HSEActionPlanFollowupTable.Personliable+mark.m}}
                            </template>
                            <el-select @visible-change="visibleChange" v-model="Form.personliable" slot="suffix" readonly>
                                <el-option v-for="item in Personliable" :label="item.text" :value="item.value">
                                </el-option>
                            </el-select>
                        </el-input>
                    </el-form-item>
                </div>
            </el-col>-->
                </el-row>
                <!--<el-row>
            <el-col :span="11">
                <el-form-item>
                    <div class="elst-select-mini" >
                        <el-input size="mini">
                            <template slot="prepend">
                                {{HSEActionPlanFollowupTable.Actualcompletiontime+mark.m}}
                            </template>
                            <el-date-picker disabled slot="suffix" v-model="Form.actualcompletiontime" type="date"
                                size="mini" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择时间">
                            </el-date-picker>
                        </el-input>
                    </div>
                </el-form-item>
            </el-col>
            <el-col :span="11" :offset="2">
                <div class="elst-select-mini">
                    <el-form-item>
                        <el-input type="text" v-model="Form.completeMine" autocomplete="off"
                            size="mini" disabled="true">
                            <template slot="prepend">
                                {{HSEActionPlanFollowupTable.Briefdescriptionofcompletion+mark.m}}
                            </template>
                        </el-input>
                    </el-form-item>
                </div>
            </el-col>
        </el-row>-->
                <el-col :span="24">
                    <p class="main-label">{{HSEActionPlanFollowupTable.Remarks+mark.m}}</p>
                    <p class="lh35">{{Form.remarks}}</p>
                </el-col>
                <!--<el-col :span="24">
            <div class="elst-select-mini">
                <el-form-item>
                    <div class="el-input--mini el-input-group">
                        <div class="el-input-group__prepend">
                            {{HSEActionPlanFollowupTable.Remarks+mark.m}}
                        </div>
                        <el-input class="el-textarea__inner" type="textarea" v-model="Form.remarks"
                                  autocomplete="off"></el-input>
                    </div>
                </el-form-item>
            </div>
        </el-col>-->
            </el-row>
            <el-row  v-if="Form.actualcompletiontime!=null">
                <el-col :span="11">
                    <p class="main-label">{{HSEActionPlanFollowupTable.Actualcompletiontime+mark.m}}</p>
                    <p class="lh35">{{Form.actualcompletiontime.substring(0,10)}}</p>
                </el-col>
            </el-row>
            <el-row   v-if="Form.actualcompletiontime!=null">
                <el-col :span="24">
                    <p class="main-label">{{HSEActionPlanFollowupTable.Briefdescriptionofcompletion+mark.m}}</p>
                    <p class="lh35">{{Form.completeMine}}</p>
                </el-col>
                <el-col :span="24">
                    <p class="main-label">{{HSEActionPlanFollowupTable.Remarks+mark.m}}</p>
                    <p class="lh35">{{Form.mark02}}</p>
                </el-col>
            </el-row>
            <el-row type="flex" justify="end">
                <el-form-item>
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>-->
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>-->
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                value1: '',
                // picked : '1',
                //父业传参
                id: '',
                //获取下拉菜单Personliable
                Personliable: [],
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    sourcesofactionplans: '',
                    serialnumber: '',
                    specificcontentofactionplan: '',
                    plannedcompletiondate: '',
                    personliable: '',
                    briefdescriptionofcompletion: '',
                    sysUser: {name:''}

                },
                //表单验证
                rules: {
                    sourcesofactionplans: [
                        verification.NotNull,
                    ],
                    serialnumber: [
                        verification.NotNull,
                    ],
                    specificcontentofactionplan: [
                        verification.NotNull,
                    ],
                    plannedcompletiondate: [
                        verification.NotNull,
                    ],
                    personliable: [
                        verification.NotNull,
                    ],

                    briefdescriptionofcompletion: [
                        verification.NotNullSelect
                    ],

                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    if (mythis.Form.specificcontentofactionplan.length <= 0) { return false; } else {
                        this.$refs[formName].validate(function (valid) {
                            //验证通过
                            if (valid) {
                                onSubmitForm(this, '/api/JG_HSEPlan/Save', mythis.Form);
                            } else {
                                //验证失败
                                return false;
                            }
                        });
                    }
                },
                getData: function () {
                    getData(this, '/api/JG_HSEPlan/get?id=' + this.id);
                    //this.Form.frequency = this.Form.frequency + "";
                },
                //加载下拉
                GetLevelOne: function () {
                    var mythis = this;                 
                    myAjax("get", this, '/api/JG_HSEPlan/Personliable', null, function (response) {
                        var ajaxModel = response.data;
                        mythis.Personliable = ajaxModel;
                    }, false);
                },
            },
            mounted: function () {
                this.id = getUrlParam("id");
                this.getData();
                //获取下拉菜单内容
                this.GetLevelOne();
                //初始化数据
                // this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
            },
        });
    </script>
</body>

</html>